* {
    padding: 0;
    margin: 0;
}

a {
    text-decoration: none;
}

.clearfix::after {
    display: block;
    height: 0;
    line-height: 0;
    overflow: hidden;
    content: ".";
    clear: both;
}

.clearfix {
    *zoom: 1;
}


// 头部样式
header {
    display: flex;
    justify-content: space-between;
    height: 44px;
    width: 100%;
    background-color: #ff841d;
    font-size: 20px;

    >a:nth-of-type(1) {
        color: #fff;
        width: 50px;
        height: 44px;
        text-align: center;
        font-size: 30px;
        transform: scaleY(1.6);
        margin-top: -2px;
    }

    h3 {
        color: #fff;
        font-weight: 400;
        font-size: 24px;
        padding-top: 5px;
    }

    >a:nth-of-type(2) {
        width: 50px;
        background-repeat: no-repeat;
        background-size: 32px;
        background-image: url(../images/header_app.png);
        background-position: 9px center;
    }
}

// 主体部分样式开始
.main {
    width: 100%;

    ul li {
        float: left;
        display: inline-block;
        height: 220px;
        border: 1px solid #ccc;
        box-sizing: border-box;
        width: 50%;
        border-bottom: none;
        padding: 3% 5% 0;

        &:nth-of-type(odd) {
            border-right: none;
        }

        &:nth-last-of-type(1),
        &:nth-last-of-type(2) {
            border-bottom: 1px solid #ccc;
        }

        img {
            width: 150px;
            height: 140px;
        }

        .product-text {
            width: 100%;
            height: 54px;

            .product-name {
                height: 18px;
                width: 100%;
                font-size: 14px;
                line-height: 18px;
                font-weight: 700;
                color: black;
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
            }

            .product-rate {
                display: block;
                font-size: 12px;
                color: #ff841d;
            }

            .product-info {
                line-height: 20px;
                font-size: 12px;
                color: #a1a1a1;
            }
        }
    }
}

// 尾部样式开始
footer {
    background-color: #efefef;

    .footer-top {
        height: 34px;
        width: 100%;

        a {
            float: left;
            box-sizing: border-box;
            display: inline-block;
            width: 30%;
            line-height: 34px;
            font-size: 16px;
            color: black;
            border: 1px solid #ccc;
            text-align: center;
        }

        a:nth-of-type(2),
        a:nth-of-type(3) {
            border-left: none;
        }

        a:nth-of-type(3) {
            display: inline-block;
            text-align: center;
            width: 40%;
        }
    }

    .footer-bottom {
        padding-top: 20px;
        padding-bottom: 30px;
        text-align: center;
        color: #666666;
        font-size: 12px;

        p>a {
            font-size: 12px;
        }

        p>a:nth-of-type(1) {
            color: red;
        }

        p>a:nth-of-type(2) {
            color: black;
        }
    }
}


// 商品详情页的样式
.product-main {
    padding: 20px 15px 0;

    h2 {
        font-size: 20px;
        line-height: 32px;
        color: #666666;
    }

    span {
        display: block;
    }

    span:nth-of-type(1) {
        color: #ff841d;
    }

    span:nth-of-type(2) {
        color: #a1a1a1;
        font-size: 14px;
        line-height: 42px;
    }

    p {
        width: 70%;
        color: #666666;
        font-size: 16px;
    }

    img {
        width: 60%;
        padding: 15px 0 30px;
    }

    a {
        color: #fff;
        font-size: 20px;
        display: block;
        background-color: #ff841d;
        width: 100%;
        height: 36px;
        line-height: 36px;
        text-align: center;
        border-radius: 5px;
    }

    img:nth-of-type(2) {
        width: 100%;
    }

    .comment {
        width: 100%;

        .tit {
            color: black;
            font-size: 18px;
            padding: 10px 0;
        }

        textarea {
            width: 100%;
            height: 200px;
            border: 1px solid #a1a1a1;
        }

        input[type="submit"] {
            margin-top: 5px;
            color: #fff;
            text-align: center;
            font-size: 16px;
            width: 180px;
            height: 36px;
            background-color: #ff841d;
        }
    }
}